The problem of efficient background separation from still images is of great practical importance in numerous applications. One of them, which becomes more and more present in the industrial world is the three-dimensional reconstruction of an object, given a set of still images. In order to perform a good reconstruction, an important preliminary step is to remove from the pictures the objects which are not of interest.
State of the art background removal methods focus more on good segmentation performances for still pictures in complex backgrounds. In such cases, segmentation can be seen as an optimization problem in Markov fields or graphs. The obtained algorithms provide extremely good segmentation performances, but the computational complexity makes them less suited for embedded, real-time, applications. For these applications, choosing a suitable color space for color segmentation is very important, since the accuracy of color detection affects segmentation results. The HSV color space (Hue, Saturation, Value) is one of the most used color space in the field. Uses include image enhancement, feature-based classification, or in addition to existing segmentation frameworks. Given a pixel p=(R,G,B) described in the RGB coordinate system, coded with L bits, with a maximum component M=max{R,G,B} and minimum component m=min{R,G,B}, it can be decomposed into the HSV color space accordingly to the following equations:
                    H        =                  {                                                    0                                                                                  if                    ⁢                                                                                  ⁢                    M                                    =                                      m                    .                                                                                                                                            60                    °                                    ×                                                            G                      -                      B                                                              m                      -                      m                                                        ⁢                  mod                  ⁢                                                                          ⁢                                      360                    °                                                                                                                    if                    ⁢                                                                                  ⁢                    M                                    =                                      R                    .                                                                                                                                            60                    °                                    ×                                      (                                                                                            B                          -                          R                                                                          M                          -                          m                                                                    +                      2                                        )                                                                                                                    if                    ⁢                                                                                  ⁢                    M                                    =                                      G                    .                                                                                                                                            60                    °                                    ×                                      (                                                                                            R                          -                          G                                                                          M                          -                          m                                                                    +                      4                                        )                                                                                                                    if                    ⁢                                                                                  ⁢                    M                                    =                                      B                    .                                                                                                                                          S        =                  {                                                    0                                                                                  if                    ⁢                                                                                  ⁢                    M                                    =                  m                                                                                                                          M                    -                    m                                    M                                                            otherwise                                                                        (        1        )                                V        =                              max            ⁢                          {                              R                ,                G                ,                B                            }                                                          2              L                        -            1                                              (        2        )            
The HSV color space is more fitted for color-based segmentation tasks, as it corresponds more closely to the human perception of color. In the HSV coordinate system, the saturation is a measure of the lack of whiteness in the color, whereas the hue is defined as the angle from the red color axis, and value refers to the brightness. However, most cameras used for embedded applications can provide pictures in JPEG format, that is after a lossy compression. This compression step cannot usually be circumvented, and yields a significant distortion in the data available on the HSV space.
FIGS. 1A-1F illustrate the distortion brought by the lossy compression. In this example, the G component in the RGB space is set to 255, while the R and B components change uniformly from 0 to 255 altogether. The Hue of the original image is equal to ⅓. It can be observed that the JPEG compression introduced a distortion of the Hue, which is particularly visible for dark and white tones.
Numerous embedded devices used for image processing and 3D-reconstruction include cameras which provide JPEG pictures of the object to reconstruct. In this framework, an important step is the segmentation of the image, in order to isolate the object of interest, but the JPEG compression introduces artifacts which can cripple any segmentation procedure. Images must be acquired by technically sophisticated cameras having low compression rates to avoid misclassification of elements in the image due to unwanted artifacts that may appear in images captured by less technically sophisticated cameras. Further, standard background-learning methods utilize slow algorithms, thus reducing the efficiency of prior art systems.